package com.trf.fm1;

import java.util.Scanner;

/**
 * @author 小小唐
 * @Date 2022/9/19-星期一-15:05
 *
 * if... else if ...
 *
 * 使用if嵌套语句实现成绩等级的判定
 */
public class IfDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String grade;
        System.out.println("请输入你的成绩：");
        int score = scanner.nextInt();

        if (score>=90){
            grade = "优秀";
        }else if (score>=80){
            grade = "良好";
        }else if (score>=70){
            grade = "中等";
        }else if (score>=60){
            grade = "及格";
        }else {
            grade = "不及格";
        }

        System.out.println("你的成绩为："+grade);
    }
}
